import { ICondition } from '../../interfaces';

/**
 * 向params condition中增加参数
 */
export default function add_param<T extends {}>(condition: ICondition, field_name: string, param_value: string | number | boolean | T) {
	const param = condition.param || (condition.param = {} as any);
	param[field_name] = param_value;	// complex query like or, in
	return condition;
}
